package dyyx.demo;
import java.util.Date;

import org.h2.mvstore.MVMap;
import org.h2.mvstore.MVStore;

import dyyx.util.CommUtil;

public class MVStoreMetaTest {

	public static void main(String[] args) throws Exception {
		System.out.println("hello,MVStoreReadTest.java,"+new Date());
		
		String fileName = CommUtil.getUserHome()+"/h2/001.data";
		//  java.lang.IllegalArgumentException: Directory does not exist: nio:/Users/dugang/h2 [1.4.200/0]
		MVStore s = MVStore.open(fileName);
		
		
		
		
		System.out.println("chunksFillRate="+s.getChunksFillRate());
		System.out.println("cacheSizeUsed="+s.getCacheSizeUsed());
		System.out.println("currentVersion="+s.getCurrentVersion());
		System.out.println("fillRate="+s.getFillRate());



		MVMap<Integer, String> map = s.openMap("data");
		

		System.out.println("map size "+map.size());

		System.out.println("firstKey="+map.firstKey());
		System.out.println("lastKey="+map.lastKey());
		
		System.out.println(map.getStore());

		
		s.close();
		


	}
}
